home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / IPC.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  1KB  |  50 lines

  1. #ifndef _LINUX_IPC_H
  2. #define _LINUX_IPC_H
  3.  
  4. #include <linux/types.h>
  5.  
  6. #define IPC_PRIVATE ((__kernel_key_t) 0)  
  7.  
  8. struct ipc_perm
  9. {
  10.     __kernel_key_t    key;
  11.     __kernel_uid_t    uid;
  12.     __kernel_gid_t    gid;
  13.     __kernel_uid_t    cuid;
  14.     __kernel_gid_t    cgid;
  15.     __kernel_mode_t    mode; 
  16.     unsigned short    seq;
  17. };
  18.  
  19. /* resource get request flags */
  20. #define IPC_CREAT  00001000   /* create if key is nonexistent */
  21. #define IPC_EXCL   00002000   /* fail if key exists */
  22. #define IPC_NOWAIT 00004000   /* return error on wait */
  23.  
  24. /* these fields are used by the DIPC package so the kernel as standard
  25.    should avoid using them if possible */
  26.    
  27. #define IPC_DIPC 00010000  /* make it distributed */
  28. #define IPC_OWN  00020000  /* this machine is the DIPC owner */
  29.  
  30. /* 
  31.  * Control commands used with semctl, msgctl and shmctl 
  32.  * see also specific commands in sem.h, msg.h and shm.h
  33.  */
  34. #define IPC_RMID 0     /* remove resource */
  35. #define IPC_SET  1     /* set ipc_perm options */
  36. #define IPC_STAT 2     /* get ipc_perm options */
  37. #define IPC_INFO 3     /* see ipcs */
  38.  
  39. #ifdef __KERNEL__
  40.  
  41. /* special shmsegs[id], msgque[id] or semary[id]  values */
  42. #define IPC_UNUSED    ((void *) -1)
  43. #define IPC_NOID    ((void *) -2)        /* being allocated/destroyed */
  44.  
  45. #endif /* __KERNEL__ */
  46.  
  47. #endif /* _LINUX_IPC_H */
  48.  
  49.  
  50.